package me.xhy.java.springboot3.webflux.projectreactor.s3projectreactor;

import reactor.core.publisher.Flux;

public class S4Handle {
  public static void main(String[] args) {
    // 没弄明白 handle 和 map 的不同点在那里
    Flux.range(1, 10)
        .map(i -> i + "-map")
        .log()
        .handle((value, sink) -> {
//          System.out.println("handle 当前值： " + value);
          // 业务 或者 计算
          String user = value + "-handle";
          sink.next(user);
        }).log().subscribe();
  }
}
